<?php
/*
Модуль "Новость подробно"
*/
	
	$sql = 'SELECT * FROM '.DB::$tables['articles'].
		' WHERE `articles_category`="news"  AND `articles_id`='.intval($arOut['article_id']);//AND `articles_publicated`="1"
	$article = exec_sql2array($sql); myPrint( $article, '$article');
	if(count($article)>0){
		$arr = $article[0];
		
		$preViewMode='';
		if( !$arr['articles_publicated'] ){
			if( !checkAccess( array( '1','10') ) ){
				echo Page::return404();
				return;			
			} else $preViewMode = '( предпросмотр )';
		}
		
			preg_match_all('/\d*/', $arr['articles_crt_date'], $mtch); 
		$article_date = $mtch[0][4].'.'.$mtch[0][2].'.'.$mtch[0][0];
		$article_text = $arr['articles_text'];
		$article_title = '<h2>'.'<i class="simple">'.$article_date.'</i>'.' '.$arr['articles_title'].$preViewMode.'</h2>';	
	} else {
		echo Page::return404();
		return;
	}
	
?>
<div id="container">
	<div id="content" class="full">
		<div id="infoblock_wrapper" class="block main_b shadow">
		
		<div id="" class="main_info">
<a class="simple" href="/news">к новостям...</a>
<?php
	echo $article_title;
	echo $article_text;
?>
		</div>
			
		</div><!-- main_b-->
	</div><!-- #content-->
</div><!-- #container-->